// token
export const TokenKey = 'fast-token';
export const TokenPrefix = 'Bearer ';
// 判断是否登录
export const isLogin = () => {
	return !!localStorage.getItem(TokenKey);
};
export const setToken = (token: string) => {
	localStorage.setItem(TokenKey, token);
};
export const getToken = () => {
	return localStorage.getItem(TokenKey);
};
// 自定义token
export const setCustomToken = (key: string, token: string) => {
	localStorage.setItem(key, token);
};
export const getCustomToken = (key: string) => {
	return localStorage.getItem(key);
};
// 清除token
export const clearToken = () => {
	localStorage.removeItem(TokenKey);
};
